<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Dashboard extends Admin_Controller {

	public function index() {
		login();
	}
	
	public function login() {
		$this->loadLayout()->renderLayout();
	}
	
	public function view($id=null) {
		//$this->output->enable_profiler(TRUE);
		
		// init post list
		$cat = $id!=null ? App::model('category_model')->read($id) : null;
		if ($cat) {
			App::setVar('cur_cat', $cat);
			App::model('post_model')->addCategoryFilter($id);
		}
		
		$this->loadLayout();
		$this->layout->getBlock('root')->setTitle('Page Heading');
		$this->renderLayout();
	}

}
